module sw.forwardmode;
import nazo.http, std.string;
import sw.mode, sw.siteconfig, sw.modelist, sw.utils, sw.siteconfig;

class ForwardModeFactory:ModeFactory{
  mixin TModeFactory!();
  IMode getMode(string name){
    return new ForwardMode(cfg);
  }
}

class ForwardMode:Mode!(){
  this(SiteConfig* cfg){
    super(cfg);
  }
  override void response(){
    HttpResponse.write("",301,["Location":getOriginalUri(cfg)]);
  }
}
